home *** CD-ROM | disk | FTP | other *** search
- //
- // Launch paintbrush.exe
- //
- :(pbrush.exe
- @Vv
- //
- // SHOW SEVERAL INTRODUCTORY TEXT BOXES
- //
- :#L
- This small script will highlight several points of interest for you, as a demo
- script designer.
- I hope, you have already read README.TXT file, and you are familiar with the
- basic concepts of Stdemo Player. If not, you'll have a chance to do this later.
- .N
- As you can see, this box has two buttons. If you would like to stop this demo -
- select "Stop" button at any time, otherwise select "Continue". The same is correct
- for all dialog boxes to come.
- .N
- Try to move this dialog box, as you move any window. Note, however, that you can
- "drag" this box by selecting any point inside it, except buttons. It makes the whole
- business of moving a lot easier.
- #
- :#MU
- Even if you manage to move it outside the screen, so that it becomes impossible to
- move it back - you still are able to continue execution, by pressing C key, or to
- stop it by pressing S key.
- .S
- Note also how politely cursor points to the "Continue" button, so that the only
- things you have to do are: read and click.
- #
- :#M
- You may ask, how I created this solid background? Rather simple.
- I started the Paintbrush, and selected View Picture from it's menu.
- These are the commands, which have done this:
- .S
- :(pbrush.exe
- .N
- @Vv
- #
- //
- // SHOW THE MAIN MENU
- //
- :LmainMenu
- :*L
- Now you may choose one of the topics and continue...
- 1startreadMe|Show readme.txt.
- 2startScriptTxt|Show script.txt ( currently running script).
- 4textBox|Demonstrate various TEXT boxes.
- 5menuBox|Demonstrate various MENU boxes.
- 6inputBox|Demonstrate various INPUT boxes.
- 7calcDemo|Demonstrate mouse actions.
- 8pbrushDemo|Extensive keyboard/mouse action script.
- 9finishDemo|Finish this demo.
- *
- //
- // SHOW README.TXT
- //
- :LstartreadMe
- :(notepad.exe readme.txt|1
- :LcontrolNotepad
- :*MDR
- 1pageDown|Scroll one page down
- 2pageUp|Scroll one page up
- 3goBottom|Show the last page
- 4goTop|Show the first page
- 5closeReadme|Return to the main menu
- *
- :LpageDown
- ]+
- :GcontrolNotepad
- :LpageUp
- ]-
- :GcontrolNotepad
- :LgoBottom
- %]E
- :GcontrolNotepad
- :LgoTop
- %]H
- :GcontrolNotepad
- :LcloseReadme
- @FX
- :)
- :GmainMenu
- //
- //
- // DEMONSTRATE VARIOUS TEXT BOXES
- //
- //
- :LtextBox
- :#W
- There are 5 text boxes available at the present time. They vary by their size
- only. Any can be placed at one of the 9 pre-defined screen locations.
- I'll show all of them one by one.
- .S
- This one - is the WIDE box.
- #
- :#NUL
- And this is the NARROW box. I programmed it to appear in the upper left corner
- of the screen.
- #
- :#SCD
- This one is SMALL. It is centered at the bottom of screen.
- #
- :#MRD
- This is the MEDIUM one.
- .S
- .S
- .S
- It is located in the bottom right corner.
- #
- :#L
- And finally the LARGE one.
- .N
- In the center.
- #
- :GmainMenu
- //
- // SHOW README.TXT
- //
- :LstartScriptTxt
- :(notepad.exe script.txt|1
- :LcontrolScriptTxt
- :*MDR
- 1pageScriptDown|Scroll one page down
- 2pageScriptUp|Scroll one page up
- 3goScriptBottom|Show the last page
- 4goScriptTop|Show the first page
- 5closeScriptTxt|Return to the main menu
- *
- :LpageScriptDown
- ]+
- :GcontrolScriptTxt
- :LpageScriptUp
- ]-
- :GcontrolScriptTxt
- :LgoScriptBottom
- %]E
- :GcontrolScriptTxt
- :LgoScriptTop
- %]H
- :GcontrolScriptTxt
- :LcloseScriptTxt
- @FX
- :)
- :GmainMenu
- //
- //
- // DEMONSTRATE VARIOUS MENU BOXES
- //
- //
- :LmenuBox
- :#M
- You actually just saw the MENU box - you've chosen this topic from it.
- .S
- Now, I'll show several more menu boxes to demonstrate how you can customize
- them.
- #
- :*S
- Small box has only two items.
- 1cmenu|Whatever you chose -
- 2cmenu|I go ahead...
- *
- :Lcmenu
- :#S
- Then I'll show the same box, but without the header text.
- .S
- Note that the header field is hidden.
- #
- :*S
- 1cmenu1|The same box, but...
- 2cmenu1|without the header field.
- *
- :Lcmenu1
- :*M
- This is the MEDIUM menu box. All 5 fields are present, as you see.
- 1cmenu2|First menu item...
- 2cmenu2|Second menu item...
- 3cmenu2|Third menu item...
- 4cmenu2|Fourth menu item...
- 5cmenu2|Fifth menu item...
- *
- :Lcmenu2
- :*M
- Now look, this is the same box - but I skipped 1-st, 3-rd and 5-th items.
- 2cmenu3|Second menu item...
- 4cmenu3|Fourth menu item...
- *
- :Lcmenu3
- :*L
- And here the full-blown LARGE menu box goes... Of course, when you code it,
- you may skip the header and/or any of the items. Isn't it nice to have so many choices?
- 1cmenu4|This is the first item of the large menu box.
- 2cmenu4|This is the second item of the large menu box.
- 3cmenu4|This is the third item of the large menu box.
- 4cmenu4|This is the fourth item of the large menu box.
- 5cmenu4|This is the fifth item of the large menu box.
- 6cmenu4|This is the sixth item of the large menu box.
- 7cmenu4|This is the seventh item of the large menu box.
- 8cmenu4|This is the eighth item of the large menu box.
- 9cmenu4|This is the ninth item of the large menu box.
- *
- :Lcmenu4
- :GmainMenu
- :LinputBox
- //
- //
- // DEMONSTRATE VARIOUS INPUT BOXES
- //
- //
- :#M
- There are 3 available sizes for the INPUT boxes: small, medium and large.
- Every box has a header text field and from 1 to 9 edit fields. For the medium and
- large boxes every edit field paired with the description field.
- .S
- You'd better look than read...
- #
- // Clear all variables.
- :$1
- :$2
- :$3
- :$4
- :$5
- :$6
- :$7
- :$8
- :$9
- :%S
- This is the small input box.
- Note, it has only one editable field.
- 1
- %
- :$1This is the text, assigned to $1
- :%S
- This is the same box, but it's edit field
- is not empty.
- 1
- %
- :$1
- :%M
- This is the MEDIUM input box. As you see it has 5 edit fields.
- Enter something...
- 1Description 1
- 2Description 2
- 3Description 3
- 4Description 4
- 5Description 5
- %
- :%M
- This is the same MEDIUM input box, but I skipped the 1-st and the 5-th fields.
- 2Description 2
- 3Description 3
- 4Description 4
- %
- :%L
- This is the full LARGE input box. Note that
- some fields are without description.
- 1Description for the field 1
- 2Description for the field 2
- 3Description for the field 3
- 4Description for the field 4
- 5
- 6Description for the field 6
- 7Description for the field 7
- 8
- 9Description for the field 9
- %
- :%L
- And this is the same LARGE input box. You may skip some fields in it. Note that
- some fields are missing.
- 1Description for the field 1
- 3Description for the field 3
- 5Description for the field 5
- 7Description for the field 7
- 9Description for the field 9
- %
- :#S
- And now I'll show how you can use what is entered into the edit
- fields of the INPUT box. I hope, you have typed something.
- #
- :(notepad.exe|1
- If you have entered some text into the edit fields,]!
- I'll type it here (values are enclosed in the angle brackets)]:]!
- The first field has the value]: <$1>]!
- The second field has the value]: <$2>]!
- The third field has the value]: <$3>]!
- The fourth field has the value]: <$4>]!
- The fifth field has the value]: <$5>]!
- The sixth field has the value]: <$6>]!
- The seventh field has the value]: <$7>]!
- The eighth field has the value]: <$8>]!
- The ninth field has the value]: <$9>]!
- :#SDR
- Simply click continue...
- #
- @FX
- :)
- // clear all variables
- :$1
- :$2
- :$3
- :$4
- :$5
- :$6
- :$7
- :$8
- :$9
- :GmainMenu
- //
- // DEMONSTRATE MOUSE ACTIONS
- //
- :LcalcDemo
- :(calc.exe
- :C11
- :S324|283
- :OFC
- @VT
- // Clear
- :#SUL
- I'm going to move the cursor to the 'CLEAR' button - and click.
- #
- :M0|0
- :M38|66|100
- :BL1:BL0
- // click 2
- :#SUL
- Now I'm going to move the cursor to the '2' button - and click.
- #
- :M135|196|100
- :BL1:BL0
- // click *
- :#SUL
- Now I'll move to the '*' button - and click.
- #
- :M242|152|100
- :BL1:BL0
- // click 3
- :#SUL
- And here we go to the '3' button - and click.
- #
- :M189|196|100
- :BL1:BL0
- // click =
- :#SUL
- Now I'm going to click on '=' and, truly, I'm expecting to get....
- #
- :M295|240|100
- :BL1:BL0
- :#SUL
- Don't tell me that the result is not equal to six, please!
- #
- :C00
- @E]<]|]|]|]|]|]!
- :)
- :GmainMenu
- :LpbrushDemo
- //
- // Launch paintbrush.exe
- //
- :(pbrush.exe
- :C11
- //:=200
- // Make sure the paint area is big enough
- @OI@D@O]~]!
- //Make it fullscreen
- @F]<]|]|]|]|]!
- // Select font
- @TFTimes New Roman]~Bold]~32]~]~]!
- // Assume, that the whole windows area is 1024x768
- :OSW
- :S1024|768
- // Select the tool
- ]~]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<
- ]|]|]|]I
- // Select the line width
- ]~]^]^]^]^]^]^]^]^]|]|]|]|]I
- // Select the light gray
- ]~]^]<]<]<]<]<]<]<]<]<]<]<]<]<]<]<
- ]>]I
- // Fill The area
- ]~
- ]I
- // Select white
- ]~]~]~]<]I]~
- // Select Text and type in white
- ]~]^]^]>]I
- // Set Cursor to 150x150
- :M150|150
- ]IIsn't it nice?]! Do you like it?]! Please, register!]!Mik.
- // Select dark gray and type
- ]~]<]I]>]I]~]~]>]|]I]~
- // Set Cursor to 152x152
- :M152|152
- ]IIsn't it nice?]! Do you like it?]! Please, register!]!Mik.
- // Select light gray and type
- ]~]<]I]>]I]~]~]^]I]~
- // Set Cursor to 151x151
- :M151|151
- ]IIsn't it nice?]! Do you like it?]! Please, register!]!Mik.
- :C00
- :#SDR
- I can't believe you didn't enjoy it...
- #
- //
- // Kill paintbrush
- //
- @FXN
- :)
- :GmainMenu
- //
- // SPECIAL __STOP__ PROCESSING
- //
- :LfinishDemo
- //
- // Kill paintbrush
- //
- ]!
- @FX
- :)
- :Gstop
- :L__STOP__
- :X0
- :#S
- I just wanted to show here that you can catch in you script when STOP
- button is pressed. After you press Continue - this demo will simply be terminated.
- #
- :Lstop
-